<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>v-model</title>
		<script src="js/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<form action="" method="post">
				姓名：<input type="text" name="username" v-model="user.username"> <br>
				性别：<input type="text" name="sex" v-model="user.sex">
			</form>
		</div>
	</body>
	<script>
		new Vue({
			el:"#app",
			data:{
				user:{
					username:"xiaohong",
					sex:"female"
				}
			}
		});
	</script>
</html>
